<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    .mydiv{
      width: 400px;
      height: 200px;
      background-color: pink;
    }
    img{
      width: 400px;
    }
    button{
      margin: 0 auto;
      background-color: rgb(69, 43, 214);
      color: aliceblue;
      border: 0cap;
      border-radius: 5px;
      width: 90px;
      height: 35px;
    }
    button:hover{
      background-color: #354da8;
      box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
  </style>
</head>
<body>
  <div class="mydiv"></div>
  <img src="/img/2.png" id="myimg" onkeydown="myfun()"><br>
  <button onclick="change()" id="mybtn">点击按钮</button>
</body>
<script src="/jQuery/jquery-3.7.1.js"></script>
<script>
    var mydiv=$('.mydiv')
    mydiv.attr('background-color',"aliceblue");
</script>
</html>